package com.shiwaixiangcun.customer.entity;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

/**
 *
 * @author Administrator
 * @date 2017/5/25
 */

public class LoginResultBean implements Parcelable {


    public static final Parcelable.Creator<LoginResultBean> CREATOR = new Parcelable.Creator<LoginResultBean>() {
        @Override
        public LoginResultBean createFromParcel(Parcel source) {
            return new LoginResultBean(source);
        }

        @Override
        public LoginResultBean[] newArray(int size) {
            return new LoginResultBean[size];
        }
    };
    /**
     * mAccessToken : 8560775e839bec734446ae84b311dd37
     * expires_in : 43200
     * refresh_token : 78ad77649c6147735420c64ad46357de
     * token_type : Bearer
     */


    @SerializedName("access_token")
    private String mAccessToken;
    @SerializedName("expires_in")
    private Long mExpiresIn;
    @SerializedName("refresh_token")
    private String mRefreshToken;
    @SerializedName("token_type")
    private String mTokenType;

    public LoginResultBean() {
    }

    public LoginResultBean(String accessToken, Long expiresIn, String refreshToken, String tokenType) {
        mAccessToken = accessToken;
        mExpiresIn = expiresIn;
        mRefreshToken = refreshToken;
        mTokenType = tokenType;
    }

    protected LoginResultBean(Parcel in) {
        this.mAccessToken = in.readString();
        this.mExpiresIn = (Long) in.readValue(Long.class.getClassLoader());
        this.mRefreshToken = in.readString();
        this.mTokenType = in.readString();
    }

    public String getAccessToken() {
        return mAccessToken;
    }

    public void setAccessToken(String accessToken) {
        mAccessToken = accessToken;
    }

    public Long getExpiresIn() {
        return mExpiresIn;
    }

    public void setExpiresIn(Long expiresIn) {
        mExpiresIn = expiresIn;
    }

    public String getRefreshToken() {
        return mRefreshToken;
    }

    public void setRefreshToken(String refreshToken) {
        mRefreshToken = refreshToken;
    }

    public String getTokenType() {
        return mTokenType;
    }

    public void setTokenType(String tokenType) {
        mTokenType = tokenType;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.mAccessToken);
        dest.writeValue(this.mExpiresIn);
        dest.writeString(this.mRefreshToken);
        dest.writeString(this.mTokenType);
    }
}
